﻿namespace HaskellPlugin {
	/// <summary>
	/// The token class defines general haskell lang tokens.
	/// </summary>
	struct Token {
		/// <summary>
		/// Kind end defines all types of lexems.
		/// </summary>
		public enum Kind { 
			NewLine, Space, Undefined,
			ID, Operator, TypeID, Keyword,
			LineComment, StringConst
		}

		readonly string m_lexem;
		readonly Kind   m_kind;

		/// <summary>
		/// 
		/// </summary>
		public Kind KindOfLexem {
		  get { return m_kind; }
	  }

		/// <summary>
		/// 
		/// </summary>
		public string Lexem {
			get { return m_lexem; }
		}

    /// <summary>
    /// Constructs token from correct the 
		/// lexeme and kind of the lexeme.
    /// </summary>
    /// <param name="lexeme"></param>
    /// <param name="kind"></param>
		public Token(string lexeme, Kind kind) {
			m_lexem = lexeme;
			m_kind = kind;
		}
	}
}
